#include <vector>
struct Node;
std::vector<Node*> NodeList;
struct Node
{
    std::string strFile;
    NodeList children;
    bool isLeafNode() const {return children.empty();}
};
void getLeafNode(Node*root, NodeList&leafs){
    queue<Node*> Q;
    Q.push(root);
    while(!Q.empty()){
        int size = Q.size();
        while(size){
            Node* front = Q.front();
            Q.pop();
            if(front->isLeafNode()){
                leafs.push_back(front);
            }
            else{
                for(auto it = front->children.begin();it!=front->children.end();it++){
                    Q.push(*it);
                }
            }
            size--;
        }
    }
}